package com.hspedu.springcloud.service;

import com.hspedu.springcloud.entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * openfiegn 接口方式远程调用 seata-storage-micor-service 服务的 /storage/reduce api 接口
 */
@FeignClient(value = "seata-storage-micor-service")
public interface StorageService {

    @PostMapping(value = "/storage/reduce")
    Result reduce(@RequestParam("productId") Long productId, @RequestParam("nums") Integer nums);
}
